/*jslint vars: true, plusplus: true, sloppy: true */
/*global angular, ocDialog */
ocDialog.filter("gridMatrix", function () {

	return function (data, width) {
		var i, gridData = [];

		// 整理数据宽度
		angular.forEach(data, function (row) {
			var gridRow = [];
			for (i = 0; i < width; i++) {
				gridRow[i] = row[i];
			}
			this.push(gridRow);
		}, gridData);

		return gridData;
	};
});
